<?php
if (isset($_POST['xin'])){
    include '/var/www/klnm/c/config.php';
 
    $xin=addslashes(trim($_POST['xin']));
     
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, 'mingjia');
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
    
    $mysqli->query("INSERT INTO `xin` (`id`, `thetxt`, `createtime`) VALUES (NULL, '".$xin."', '".date("Y-m-d H:i:s")."')");
        
    
    $mysqli->close();
    
    echo json_encode(array('s'=>'y'));
}else{
    echo json_encode(array('s'=>'n'));
}

?>